home *** CD-ROM | disk | FTP | other *** search
/ CyberMycha Extra 2004 January / CyberMycha Extra 1-2004 (Poland) (Disc 2).bin / Pippi / gmtr.dir / Internal_5_computerB.ls < prev    next >
Encoding:
Text File  |  2001-09-05  |  1.1 KB  |  55 lines

  1. property meSprite, firstPos, origPos, mPos, originLocZ
  2. global gmObject
  3.  
  4. on beginSprite me
  5.   gmObject.reportComputer(me.spriteNum)
  6.   meSprite = sprite(me.spriteNum)
  7.   originLocZ = meSprite.locZ
  8.   firstPos = meSprite.loc
  9. end
  10.  
  11. on mouseDown me
  12.   if (gmObject.moveCounter = 0) and (gmObject.whosNext = 0) then
  13.     gmObject.whosNext = -1
  14.   end if
  15.   if gmObject.playMode = 0 then
  16.     if gmObject.whosNext = -1 then
  17.       meSprite.locZ = 155
  18.       origPos = meSprite.loc
  19.       mPos = the mouseLoc - origPos
  20.       repeat while the mouseDown
  21.         meSprite.loc = the mouseLoc - mPos
  22.         updateStage()
  23.       end repeat
  24.     end if
  25.   end if
  26. end
  27.  
  28. on mouseUp me
  29.   if gmObject.moveCounter = 0 then
  30.     go("play")
  31.   end if
  32.   if gmObject.playMode = 0 then
  33.     if gmObject.whosNext = -1 then
  34.       gmObject.reportUserMove(me.spriteNum, meSprite.rect, origPos)
  35.       meSprite.locZ = originLocZ
  36.     end if
  37.   end if
  38. end
  39.  
  40. on mouseEnter me
  41.   if gmObject.playMode = 0 then
  42.     if gmObject.whosNext = -1 then
  43.       cursor([500, 501])
  44.     end if
  45.   end if
  46. end
  47.  
  48. on mouseLeave me
  49.   cursor(0)
  50. end
  51.  
  52. on endSprite me
  53.   cursor(0)
  54. end
  55.